<?php

use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;
use Dcat\Admin\Admin;

Admin::routes();

Route::group([
    'prefix'     => config('admin.route.prefix'),
    'namespace'  => config('admin.route.namespace'),
    'middleware' => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/', 'HomeController@index');

    // 品牌管理
    $router->resource('brands/index', 'BrandController');
    // 获取品牌
    $router->get('brands/get', 'BrandController@getBrands');

    // 产品管理
    $router->resource('product/list', 'ProductController');
    // 获取产品
    $router->get('product/get', 'ProductController@getProducts');

    // 职位等级
    $router->resource('member/position', 'MemberPositionController');

    // 用户管理
    $router->resource('business/member', 'BusinessMemberController');
    // 用户管理 - 用户获取
    $router->get('business/get-members', 'BusinessMemberController@getMembers');

    // 质保卡批次
    $router->resource('cards/batch-list', 'CardsBatchController');

});
